package com.yueyang.sojourn.server.service.sojourn.tourist;

import com.yueyang.sojourn.server.model.po.SojournTourist;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Andy.yang
 * @version v1
 * @summary
 * @Copyright (c) 2019, YueYang Group All Rights Reserved.
 * @since 2020/3/17
 */
@Mapper
public interface SojournTouristMapper {
    /**
     * 创建游客
     * @param tourist
     * @return
     */
    Long insert(SojournTourist tourist);

    /**
     * 编辑游客
     * @param tourist
     * @return
     */
    int update(SojournTourist tourist);

    /**
     * 修改游客状态
     * @param id
     * @return
     */
    int delete(@Param("id") Long id,@Param("updator") Long updator);

    /**
     * 查询游客
     * @param id
     * @return
     */
    SojournTourist selectByPrimaryKey(Long id);

    /**
     *  查询游客列表
      * @param userId
     * @return
     */
    List<SojournTourist> findBy(@Param("userId") Long userId,@Param("status") Integer status);

    /**
     *
     * @param ids
     * @return
     */
    List<SojournTourist> selectByIds(List<Long> ids);
}
